import SubjectSearcher.*;
import TemplateCode.Subject;
import TemplateCode.SubjectProxy;
import TemplateCode.SubjectReal;

public class Main {
    public static void main(String[] args) {


        System.out.println("------------代理模式-模版--------------");
        Subject subject =new SubjectProxy(new SubjectReal());
        subject.request();
        System.out.println("------------代理模式-查找--------------");
        Searcher searcher=new ProxySearcher(new Logger(),new RealSearcher(),new AccessValidator());
        System.out.println("查询结果:\t"+searcher.doSearcher("rainkaze", "114514"));
    }
}